package com.erp.ae.controller;

import com.erp.ae.service.IAeMediacenterService;
import com.ruoyi.common.core.domain.R;
import com.erp.ae.utils.AeApiUtils;
import com.ruoyi.common.core.web.controller.BaseController;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/erp/erpMediacenter")
public class AeMediacenterController extends BaseController {
    private final IAeMediacenterService iAeMediacenterService;

    /**
     * 转存视频至媒体中心
     * @param map
     * @return
     */
    @PostMapping("/videoUploadByUR")
    public R<Object> videoUploadByUR(
            @RequestBody Map<String, Object> map
    ) {
        return iAeMediacenterService.videoUploadByUR(map);
    }

    /**
     * 查询单个视频
     */
    @PostMapping("/videoListPage")
    public R<Object> videoListPage(
            @RequestBody Map<String, Object> map
    ) {
        return iAeMediacenterService.videoListPage(map);

    }

    @PostMapping("/getByStorageName")
    public R<String> getByStorageName(
            @RequestBody Map<String, Object> map
    ) {
        return iAeMediacenterService.getByStorageName(map);

    }


}
